import com.xinrui.sunnyday.dao.UserDao;
import com.xinrui.sunnyday.pojo.User;
import com.xinrui.sunnyday.service.UserService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

public class test {

    @Autowired
    private UserService userService;

    @Autowired
    private UserDao userDao;

    @Test
    public void testService(){
        User user = userService.findByUsername("admin");
        System.out.println(user);
    }

    @Test
    public void testDao(){
        User user = userDao.findByUsername("admin");
        System.out.println(user);
    }
}
